package com.winit.deploy.bean;

import com.winit.common.util.LogUtil;

/**
 * Created by wangjian on 16/8/16.
 * 发布步骤
 */
public enum DeployStepEnum {
    ALL("all",-1,LogUtil.OperateType.AUTO_RELEASE),//一键发版
    PREPARE("prepare",0,LogUtil.OperateType.RELEASE_PREPARE),//准备
    STOP("stop",1,LogUtil.OperateType.RELEASE_KILL_SERVER),//停
    BAK("bak",2,LogUtil.OperateType.RELEASE_BACKUP),//备份
    INSTALL("install",3,LogUtil.OperateType.RELEASE_INSTALL),//安装
    START("start",4,LogUtil.OperateType.RELEASE_START_SERVER),//启动
    CHECK("check",5,LogUtil.OperateType.RELEASE_CHECK),//检查服务器启动状态
    VERIFY("verify",6,LogUtil.OperateType.RELEASE_VERIFY),//验证
    ROLLBACK("rollback",3,LogUtil.OperateType.RELEASE_ROLLBACK),//回滚
    RESTART("restart",-1,LogUtil.OperateType.RESTART_SERVER);//重启tomcat

    private String step;
    private Integer index;
    private LogUtil.OperateType operateType;

    DeployStepEnum(String step,Integer index,LogUtil.OperateType operateType){
        this.step = step;
        this.index = index;
        this.operateType = operateType;
    }

    public String getStep() {
        return step;
    }

    public Integer getIndex() {
        return index;
    }

    public LogUtil.OperateType getOperateType() {
        return operateType;
    }
}
